package com.he.buildermodel.builder.concretebuilder;

import com.he.buildermodel.builder.Carbuilder;
import com.he.buildermodel.product.Car;

public class Concretebuilder1<T extends Car> implements Carbuilder<T> {

    private T t;

    public Concretebuilder1(T car) {
        this.t = car;
    }

    @Override
    public void setName() {
        t.setName("房车");
    }

    @Override
    public void addFeature() {
        t.addFeature("起步50码");

    }

    @Override
    public void setPrice() {
        t.setPrice(2 << 16);
    }

    @Override
    public T getCar() {
        return t;
    }
}
